package com.core.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.core.utils.ValidatedGroup;
import lombok.Data;
import lombok.ToString;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
 * @author : HUANG
 * @create : 2025/6/1 17:02
 * @function :
 */
@Data
@ToString
public class UserVo implements Serializable {
    /**
     *
     */
    @TableId(type = IdType.AUTO)
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;
    /**
     *
     */
    @NotNull(message = "用户名不能为空", groups = {ValidatedGroup.INSERT.class})
    private String username;
    /**
     *
     */
    @NotNull(message = "密码不能为空", groups = {ValidatedGroup.INSERT.class})
    private String password;

    /**
     *
     */
    @NotNull(message = "邮箱不能为空", groups = {ValidatedGroup.INSERT.class})
    private String email;

    private List<Long> roles;
//
//    public UserVo(String username, String password, String email) {
//        this.username = username;
//        this.password = password;
//        this.email = email;
//    }
}
